package com.makefuture.util;

import java.io.PrintWriter;
import java.util.List;

import javax.servlet.http.HttpServletResponse;

public class WriteToExploer {

	public static void write(HttpServletResponse response,List<String> lines) {
		 PrintWriter p  = null;
			try {
				response.setContentType("text/html;charset=UTF-8");
				p =response.getWriter();  
				for (String l : lines) {
				    p.println(l + "\n");
				}
			} catch (Exception e) {
			}finally {
	            if (p != null) {
	                try {
	                    p.close();
	                } catch (Exception e) {
	                }
	            }
	        }
	        p.close(); 
	}
}
